package com.pro.service.imple;

import com.pro.dao.ProductOrderListMapper;
import com.pro.entity.Product;
import com.pro.entity.UserOrder;
import com.pro.entity.UserOrderPlus;
import com.pro.service.ProductOrderListService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author ：刘弘禹
 * @description：TODO
 * @date ：2021/11/12 10:25
 */
@Service
public class ProductOrderListServiceImple implements ProductOrderListService {
    @Autowired
    private ProductOrderListMapper productOrderListMapper;
    @Override
    public List<UserOrder> queryOrder(UserOrderPlus userOrderPlus) {
        List<UserOrder> userOrders = productOrderListMapper.queryOrder(userOrderPlus);
        return userOrders;
    }

    @Override
    public List<Product> getProduct(Integer productId) {
        List<Product> product = productOrderListMapper.getProduct(productId);
        return product;
    }

    @Override
    public Boolean delOrder(Integer orderId) {
        Boolean aBoolean = productOrderListMapper.delOrder(orderId);
        return aBoolean;
    }

    @Override
    public Integer getStatus(Integer orderStatus, Integer orderType) {
        Integer status1 = productOrderListMapper.getStatus(orderStatus,orderType);
        return status1;
    }
}
